package com.usth.service;

import java.util.ArrayList;
import java.util.List;

import com.usth.dao.ISearchDao;
import com.usth.model.BuyTVO;
import com.usth.model.FlightInfo;
import com.usth.model.FlightVO;
import com.usth.model.SearchVO;

public class SearchServiceImpl implements ISearchService {
	private ISearchDao searchdao;

	public ISearchDao getSearchdao() {
		return searchdao;
	}

	public void setSearchdao(ISearchDao searchdao) {
		this.searchdao = searchdao;
	}

	public List<FlightVO> search(SearchVO search) {
		List<FlightVO> li=new ArrayList<FlightVO>();
		try {
			li = this.searchdao.search(search);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return li;
	}

	public void searchD(SearchVO search) {
		this.searchdao.searchD(search);
	}

	public void searchM(SearchVO search) {
		this.searchdao.searchM(search);
	}

	public BuyTVO buy(String date, String flight_id,String landingAirportName) {
		return this.searchdao.buy(date, flight_id,landingAirportName);
	}
	
}
